Repository navigation
E54 one-click builds and E58 hardening: 35 story commits - #120
Merged
Merged
Conversation
…etwork set_tier_slug refreshes the new slug's model card before it replies (TD-5185). The test stubbed the config write but not the refresh, so it ran `secret-tool lookup` on the developer's real tst-openrouter item and, with a key there, would have asked the live host with it. Where the Secret Service is slow the reply took about 5 s against the test's 2 s wait. CI has no secret-tool, so it passed there. The test now stubs the key read and the model list and asserts the one list request carried the stub's key. Adds epic E54 to the backlog with this story. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The walkthrough could add a model and nothing could copy, relabel or remove one, so trying a variation meant overwriting the entry already there in Settings → Model. Three narrow verbs, each acked with setup_state: duplicate_preset, set_preset_label and delete_preset. The writers are in core/tstd/preset_write.py. A copy is written from the loaded entry with every role spelled out, so it shares no YAML anchor with its source. Rename changes the label and never the key, which sessions, scheduled pins and computer_use.local_worker_preset store. Every would-be file is loaded as the daemon loads it before it is written, so removing an entry whose anchor another entry uses is refused with the file untouched. delete_preset is loopback-only; none of the three is a machine-peer verb. Settings → Model lists every model with Duplicate, Rename and Remove (ModelCatalog.svelte). The UI walk copies, renames and removes one, and the census lists the new controls. Class B: recorded in DECISIONS.md. Class A: the section heading is "What you have added", because the walk finds a Settings section by a heading that contains its name, and "Model" matched "Your models". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A catalog entry said which model each role uses and how big its window is. The settings that go with a model's size and speed were global, so moving between a small local model and a large hosted one meant editing them by hand. An entry may now carry `overrides` for six global sections: session (default_effort, default_ultracode), clear_tool_results, compaction, consult, workflow and computer_use (max_prompt_images). Each key has its global key's type and limits; anything else is an error at load, so approvals, shell rules, MCP, hooks, remote attach, autonomy, keys and the engine cannot be set per model. preset_apply.effective_config() is the one resolver and _bind_session_preset its one caller for sessions. A key the entry sets wins, an unset or null key keeps the global value, a list replaces whole. The loop already re-reads the session's snapshot each turn, so clearing, consult, the image cap, workflow limits and the summarizer follow with no change at the call sites. Three daemon-level reads of session.default_effort/default_ultracode now come from the chat's own snapshot: the new router, the revive fallback, and (new) the switch: switching a chat to an entry that names an effort or Ultracode default sets the chat's to it, per the owner's decision. No protocol change. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…f its own Local, API and Grok are meant to be three entries on one picker. The engine was a separate global switch, and a catalog entry had to name a model for each of three roles, which the Grok CLI does not use. Preset.engine is native, grok or unset (unset = engine.kind, as before). The three roles are optional as a group: all or none, and none only with engine: grok. overrides and fast on a Grok entry are a load error. A session takes its engine at creation: the caller's (a scheduled pin), else the entry's, else the global one. It keeps it: set_session_preset across engines, or onto an entry with no model from TST Desk's own loop, is refused with engine_mismatch and changes nothing. For an entry with no roles, tiers() returns the empty-catalog stand-ins and every walk over the catalog's roles goes through Preset.tier_map(): credential and backup checks, key hosts, model cards, the slug snapshot, the editor checks, named workers, the model test. Memory distill and the doctor's probe use native_default(): the active entry if it has a model, else the first that does, else skipped. A scheduled job's own engine pin still wins; an empty one takes the pinned entry's. A job pinned to the native loop on an entry with no model gets a receipt. setup_state.preset_engines is the one additive wire field. The picker marks a Grok entry and holds an entry on another engine than the chat's, with the reason; Settings → Model shows no roles for one that has none. Also records TD-5259 (distill follows the chat's model) as a possible later story; nothing is built for it. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
After TD-5239 a Grok entry could sit on the picker, but only someone who
edited config.yaml could put it there.
add_grok_preset {label?} writes one catalog entry that is a label, a
fixed description and engine: grok, after the last entry or into the
empty shipped catalog. The daemon refuses it with grok_unavailable when
the Grok CLI is not found, and when an entry already names the Grok
engine. active_preset is not written. Acked with setup_state.
Settings → Engine has "Add Grok to your models" (GrokOnPicker.svelte).
It is always rendered and held with the reason where the CLI is missing,
so the UI walk's census is the same with or without Grok installed; the
walk lists it and does not press it.
Class B: recorded in DECISIONS.md.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The picker changed only the open chat, so the next new chat went back to
the old model, and nothing in the window could change that default. A
switch was refused while a reply was being written, and a model on the
other engine could not be reached from the picker at all.
switch_preset {name, session_id?, make_default} switches a chat, the
model new chats use, or both. Everything is checked first, and the
default is written first, so "both" never half-applies. An idle chat
switches now. A chat with a turn running keeps the switch as pending
(tier_state.pending_preset) and takes it when that turn completes. A
chat with no live loop has the name recorded. new_session takes an
optional preset, which opens the chat on that entry with its engine.
Binding at turn_complete is safe because SessionEventLog.add awaits its
subscribers, in registration order, before it returns to the loop: the
session's own subscriber has lowered the open-turn count and the loop has
not taken its next message. A queued message runs on the new entry; the
turn that was running asks only its own model.
The picker: a click moves the chat and the default; "Only this chat"
moves the chat alone; a pick mid-turn is allowed and the chip shows what
is waiting; a model on the other engine reads "Opens a new chat" and
does; a chat on another computer keeps set_session_preset, which its hub
forwards. set_session_preset and set_preset are unchanged.
Class B: recorded in DECISIONS.md.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…er model The picker was one flat list and switching always took the mouse. A second open window also kept the old list and default after the first one changed them. Preset.group and Preset.slot are new optional keys. The daemon names every entry's section (ModelConfig.preset_group): its own group, else Grok for the Grok engine, Local when every role resolves to a loopback URL after a bound key's host, else API. A server on the local network reads API until the entry says group: Local. A slot is 1 to 9 and unique; a copy does not take its source's. setup_state carries preset_groups, picker_groups and preset_slots. The picker lists Local, API, Grok and then other sections, with no headings for a single section, and shows each slot beside its model. ⌘⌥1…9 / Ctrl+Alt+1…9 does what a click on that model's row does, read off the physical key, and not over a modal. After add_model, set_preset, switch_preset with make_default and the catalog-edit verbs, the daemon broadcasts setup_state to this computer's other windows, leaving out the connection it is answering. ModelPicker.svelte is back under 400 lines: the row is ModelRow.svelte and what a pick does is model-pick.ts, shared with the shortcut. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A switch succeeded and the next message then failed: the local server was not started, the key was never stored, the Grok CLI was not installed. check_presets is answered with preset_readiness, one row per entry: ready, no_key, server_down or no_grok, and one sentence. A key is checked by keychain presence only. A role whose resolved URL is on this computer is asked for /models with no key (local_servers.loopback_answers, beside the "Find models on this computer" scan and under its rules); any reply counts as there. A provider's server is never contacted. An entry on the Grok engine is checked for the CLI only. The picker asks each time it opens and shows a model's problem under its name. It is a warning, not a gate: the row can still be picked. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
"Build a team" edited the model new chats use and no other. To change a
second model's context size or key, a person first had to make it the
default, which also moved every new chat onto it.
get_preset_roles {name} is answered with preset_roles: for that entry,
the four maps setup_state carries for the active one. It is read-only.
setup_state itself is unchanged, so Settings → API keys and older
clients still read the active model's roles from it.
Settings → Model has an "Editing" chooser. The store keeps the chosen
model and its roles beside the active model's, never over them, and
every write names the chosen one. A chosen model's roles are shown only
as the daemon sent them: none until its answer arrives, read again after
each write, and let go when the model is removed or becomes active.
Class B: recorded in DECISIONS.md.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The phone runs the same window in a WebView, so E54's picker is already its picker. This settles what a phone may send, that its list follows the computer, and that the row fits a phone's width. The catalog broadcast (TD-5236) now also reaches remote non-machine peers, with setup_state passed through scrub_setup_state as a remote peer's own reply is; WebSocketServer.broadcast takes remote_payload for that. check_presets from a remote peer reports keys and the Grok CLI and does not ask this computer's model servers, the rule TD-5180 set for the port scan. delete_preset stays loopback-only. "Only this chat" drops under the model's name on a narrow menu; the UI walk checks the menu and those buttons stay inside 360 px. No Kotlin changed. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The README said the daemon's only outbound HTTP is to the configured base_url. It also reads search pages, refreshes each model's card once a day, and reaches whatever the user switches on; the packaged app checks GitHub releases for updates. The entry now names each kind of host and the setting that governs it. A privacy claim narrower than the truth is worse than none. The shipped config.yaml comment on mcp said HTTP urls must be loopback; a server may set allow_remote (TD-5136). mcp/README.md said the app would gain MCP loading in a later milestone; it has it. Comments and prose only. Opens epic E58 in the backlog for the work that follows the Harness comparison. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A delegate child stopped after eight model calls, a constant in the code. That suits a lookup and cuts off a child asked to edit a few files and run a test. delegate.max_iterations (1 to 64, default 8) is now how many model calls one child may make. With the key absent a child behaves as before. A child that reaches the limit says so and names the key. The session's own iteration, spend and time caps still bound the total: a child's calls count against them with its parent's and its siblings'. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A session in a git repository works in a worktree, and by default the worktree is under TST Desk's data dir (TD-5126). The shell sandbox hides the data dir (TD-5138) and laid that mask over the workspace bind, so with sandbox: enabled every command in such a session failed before it ran. Reproduced through run_shell before the fix. build_plan now masks a hidden directory that contains the workspace first, with a tmpfs that can be passed through but not listed, and binds the workspace into it. The rest of the data dir, its listing and other sessions' worktrees stay out of reach. A hidden path inside the workspace, or apart from it, is masked last and closed as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A stdio MCP server is a command the daemon runs, now and at every session start, outside the classifier. set_mcp_server was open to a paired phone, and the handler saved and started whatever it was sent, so a paired phone could make the computer run a command with nothing shown at the computer. The entry stayed in config.yaml after the phone was removed. With the verb reopened in a test, the command ran. set_mcp_server, delete_mcp_server, set_mcp_secret and delete_mcp_secret join LOOPBACK_VERBS: a phone, the older remote token and another computer are refused with loopback_only. The config editor was already loopback-only for this stated reason. A phone still sees the list. Off the computer, Settings → MCP servers is the list and one line saying where to make changes. A test pins the verbs that make this computer run a command as loopback-only. Class B: recorded in DECISIONS.md. It removes a phone capability: a phone can no longer switch a server on or off. Other phone-open verbs that deserve a decision are listed there and not changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Grok preview pane showed an HTML file, a PDF or a page the agent chose in an iframe with no sandbox attribute. It now has sandbox="": no scripts, no forms, no popups, an origin of its own. A test reads every component's source through Vite and fails on a frame with no sandbox, or one that allows scripts with the same origin, top navigation or popups. frame-src is now said outright in the one content policy (vite.config.ts) as 'self', what default-src already gave it, and pinned for every mode. tauri.conf.json still sets no policy (TD-4807). Not run in a packaged app: whether that pane loads anything today. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A source check is not enough for a security attribute: Svelte can drop an empty attribute written as an expression (the artifact pane works round that with an action). The preview pane's is a literal; this mounts the component for each frame kind and reads the attribute off the page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The HTML an artifact preview shows is written by a model. The frame ran no script and loaded nothing, but a clicked link could send the frame to any address carrying whatever the model put in it, and a refresh or a preconnect is not governed by a document's own policy in every webview. The markup is now cleaned before it is wrapped (artifact-html.ts, its own DOMPurify instance): nothing that navigates, loads, posts or refreshes. Text, headings, tables, inline data: images, inline styles and a whole document's style blocks stay. The sandbox and the policy are unchanged; the pane says "Static preview. Links and scripts are off." Comes before the agent can feed that pane (TD-5254). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ironment A stdio MCP server was started with the daemon's whole environment, or inherited it outright when it had no values of its own. A key exported in the person's shell profile for some other tool went to every MCP server they listed. A stdio server now starts with the scrubbed environment the shell tool already uses (sanitized_env): nothing whose name looks like a key, token, password or auth setting, nothing whose value carries a credential in a URL. Ordinary variables pass, and a name a server is given in its own env is passed whatever it looks like. Hygiene, not containment: a deny-list, with the socket variables left in place. The per-OS allow-list needs trying with real servers on three systems first and is a separate story. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A delegate or workflow child's call parks on its parent's session, and the card read as if the session's own agent had asked. A child's card also came back on every reattach, because the child's call never reports a result on the session's log. approval_request gains an optional worker: the child's id, the call that started it, delegate or workflow, its kind and name, a workflow task's number and label, the start of its task, its tier's name and its worktree's branch. It is filled where the child's dispatcher is built, only when the handler is the parent session's own. The child's summary starts with who is asking, so every surface that shows the summary says it, an older phone build included. No Always allow is offered on a named worker's card or for a path tool in a child's own worktree: the saved rule would not do what it says. The card shows a line naming the child, and goes when the call that started the child returns. Class B: recorded in DECISIONS.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The only limit on model calls at once was a semaphore inside one workflow call. Two chats, a scheduled run and a workflow could all ask one local server together. model_concurrency gives a server on this computer and any other a default number, and a server named by URL its own. Nothing is set unless config sets it, so an upgrade changes nothing. A server is its scheme, host and port: every spelling of this computer on one port is one, whatever the path, model or key. The provider client holds one slot for one HTTP exchange, a streamed reply until the stream ends, and the wait between retries is spent without one, so a call holding a slot never waits on another for the same server. The daemon gives every client it builds for one server the same gate. The minimal step: no priority lane, no limit on the wait for a slot, no doctor line yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…call Renaming a repeated name cost one fs_edit call per occurrence, and three changes to one file were three calls. replace_all replaces every occurrence and reports how many. edits (up to 20) applies several replacements in order, each to the text the one before left, and writes the file once; if any cannot apply, nothing is written and the error names which one. Exactly one of the two forms. The tool is still one file per call, named in path, so the classifier judges it exactly as before. No tool was added. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
An MCP server's block is written from a hand-kept list of keys, and a Settings save carries the hand-set keys across from a second list in the set_mcp_server handler. Both are complete today, so nothing is fixed here. A key added to the model and to neither list would be dropped by the next Settings save with nothing to say so. A table names every field per transport and fails when the model gains one; the writer round-trips every field; every field is classed as sent, bound to the address, or carried; a Settings save changes only what it sent. Tests only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…wn files stay read-only The list of hidden paths holds a symlinked directory under both its names. TD-5261 compared the names as written, so the unresolved one was still masked last, over the workspace. A hidden directory that contains the workspace is now found by its resolved path and masked once. Once the workspace is bound into it, that mask is remounted read-only. A real-git, real-bubblewrap test shows that from inside a worktree session the worktree's admin directory, commondir, config.worktree, the repository's config and hooks cannot be written and git add fails, with the repository's metadata byte-identical afterwards. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Holding a server's slot wrapped the stream in a second generator, so closing the outer one no longer closed the exchange there and then. A reader that stopped early, or a stall that was returned, left the connection open until the garbage collector reached it: the three hang-up tests in test_provider_timeouts.py failed in the full suite. The exchange is now closed with contextlib.aclosing when the outer generator is, so the connection is hung up and the slot given back at once. A test covers an abandoned stream's slot. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Phone permissions, stage 1. TD-5276 made the MCP page the computer's own; the owner's decision is that a phone keeps the ability as an opt-in the person at the computer switches on after reading what it allows. - <data dir>/phone-permissions.yaml holds the grants, each with an optional expiry. It is no config key, and everything about it fails closed. - set_phone_permission is loopback-only: a phone can never grant itself. - The four MCP verbs move from LOOPBACK_VERBS to PHONE_OPT_IN. A paired phone without the grant gets phone_permission_off; the older remote token never gets a grant; another computer stays not_allowed. - peer_policy.check takes the live grants, defaulting to none. - Each use by a phone sends phone_change to the computer's windows and records the server's origin in <data dir>/mcp-origins.yaml. - Removing a phone lists what it added and offers to remove it too. - Doctor gains a warn status and uses it while a phone permission is on. - Settings, Phones and devices: "What paired phones may change", with the disclosure and Keep off / 1 hour / until I turn it off. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Distill sent the conversation to the daemon's active entry whatever the chat was on, so a chat kept on a local model could be distilled by a hosted one. It now takes the entry the chat is on when distill runs. A Grok chat, and a chat whose entry was removed, keep the TD-5239 rule. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The meter charged prompt tokens a provider stores in its cache as plain input. A tier may now name cache_write_price, and the write count is read from the usage block. A tier that names none costs what it did before. docs/models.md shows how a Claude model through OpenRouter asks for a prompt cache with one extra_body line; a test pins that it goes out as a top-level field. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Always allow saves a rule for the whole workspace, so from a child's card one worker's request could switch a tool on for the main agent and every other worker. No child's card proposes a rule now, and an always_allow frame for a child's call approves that call once and saves nothing. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The shipped config.yaml sets model_concurrency.loopback_default to 2. A config file from before the section existed has no limit, as before: the loader does not fill the section in from the shipped file. A provider's server stays unlimited. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
It needs a run on Fedora or Arch, where unprivileged user namespaces are allowed everywhere; this machine's kernel already refuses the case. Left out with a note rather than shipped untested. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The second phone permission, approval_switches. set_skip_all_approvals with enabled: true from a phone is refused unless the computer switched it on; turning approvals back on needs nothing, since it only tightens. A phone's use is announced to the computer's windows. Also corrects the verb's docstring: skip-all releases Class C too. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A builtin show_artifact with two doors: a text file in the workspace, shown without a copy, or text with a name, kept in the session's own data dir under a name the daemon makes. Class A by a rule for the builtin alone; capped in config; showing the same thing again replaces the row. The window picks the preview from the name when the path has none, shows the caption, and reads the open artifact again when it is shown again. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A paired phone could send any verb nobody had listed against it. The verbs a phone may send with no setting are now written out in phone_verbs.py, a verb in none of the sets is refused from a phone, and a test fails until a new client message type is placed. The list is what a phone could send the day before; nothing a phone does today changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Settings, MCP servers, Paste JSON reads the block from a server's README, shows what each server would run, and imports the ticked ones. Tokens go to the keychain and config.yaml gets a reference. The daemon parses the text again on import and checks every choice; a server is saved whole or not at all; no preview, error or log carries a value. From a phone both verbs need the MCP servers phone permission. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…kspace The command read any UTF-8 file under a workspace the caller named, so a script in the webview could name / and read what the user can. A workspace is now a root only when it is exactly a folder the daemon recorded as a session's workspace or worktree. No record means no workspace root. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Builds epic (E54) and the work that followed the Harness comparison (E58), as one stack of 35 commits, one per story step. It is opened as a single pull request at the owner's request so the whole stack lands on
maintogether.E54, one-click Local / API / Grok builds: TD-5233, TD-5237, TD-5234, TD-5239, TD-5258, TD-5235, TD-5236, TD-5240, TD-5241, TD-5242.
E58, hardening and reach:
read_text_fileno longer takes the caller's word for the workspace).show_artifact), TD-5253 (import MCP servers from pasted JSON).One change from the branches as built
The commit for TD-5236 used a LAN address in a test fixture (
core/tests/test_picker_groups.py) that the release scan refuses. It is replaced with an addressmain's tests already use, in that commit, so no commit here carries it. Nothing else differs fromtd/5263-schedule-propose.Tests
tests/test_picker_groups.pyafter the change: 18 passed locally.🤖 Generated with Claude Code